package com.jsam.daoimple;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.jsam.dao.UserDao;
import com.jsam.dtos.UserDto;

public class UserDaoImple extends SqlMapClientDaoSupport implements UserDao  {
	
	@Override
	public UserDto login(UserDto dto) throws DataAccessException{
		return (UserDto) this.getSqlMapClientTemplate().queryForObject("usermap.login", dto);
	}

	@Override
	public void addUser(UserDto dto) throws DataAccessException{
		this.getSqlMapClientTemplate().insert("usermap.addUser", dto);
	}

}
